export class Animal {
  name: string
  constructor (theName: string) {
    this.name = theName
  }
  move (distanceInMeters: number = 0) {
    console.log(`${this.name} moved ${distanceInMeters}m.`)
  }
}

export class Snake extends Animal {
  constructor (name: string) {
    super(name)
  }
  move (distanceInMeters = 5) {
    console.log('Slithering...')
    super.move(distanceInMeters)
  }
}

export class Horse extends Animal {
  constructor (name: string) {
    super(name)
  }
  move (distanceInMeters = 45) {
    console.log('Galloping...')
    super.move(distanceInMeters)
  }
}
